#include<iterator>
#include<vector>
#include<string>
#include<iostream>
using namespace std;

int main()
{
    string line;
    vector<string> vs;
    cout<<"Enter 10 strings: " << endl;
    for(int i = 0; i < 10; ++i)
    {
        getline(cin, line);
        vs.push_back(line);
    }

    auto rit = vs.rbegin();
    while(rit != vs.rend())
    {
        cout << *rit << endl;
        ++rit;
    }

    return 0;
}

